package com.tianji.api.client.remark.fallback;

import com.tianji.api.client.remark.RemarkClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

import java.util.Collections;
import java.util.Set;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2025/10/28 12:11
 */
@Slf4j
public class RemarkClientFallback implements FallbackFactory<RemarkClient> {
    @Override
    public RemarkClient create(Throwable cause) {
        return new RemarkClient() {
            @Override
            public Set<Long> isLiked(Iterable<Long> bizIds) {
                log.error("调用remark服务查询点赞状态异常，异常信息：{}", cause);
                return Collections.emptySet();
            }
        };
    }
}
